package org.administer.dao;

import org.administer.pojo.CrmPermission;

import java.util.List;

public interface CrmPermissionDao extends CommonDao<CrmPermission,Integer> {
    /**
     * 查询所有的父权限，子权限要放到父权限的children集合属性中返回
     * @return
     */
    public List<CrmPermission> getParentPers();

    /**
     * 根据登录用户编号查询拥有的权限信息
     * @param userId
     * @return
     */
    public List<CrmPermission> getPersByUserId(Integer userId);

    /**
     * 增加二级权限
     * @param crmPermission
     */
    public void addmenu(CrmPermission crmPermission);

    /**
     * 判断是否有子权限
     * @param id
     * @return
     */
    public List<CrmPermission> getzi(Integer id);

}
